﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Graphics;

namespace RescueRaiders
{
    namespace Particles
    {
        class ExplosionParticleSystem : ParticleSystem
        {
            public ExplosionParticleSystem(Game1 game,
                int howManyEffects, string textureFileName)
                : base(
                game, howManyEffects, textureFileName)
            {
            }


            protected override void InitializeConstats()
            {
                minInitialSpeed = 4;
                maxInitialSpeed = 50;

                minAcceleration = 0;
                maxAcceleration = 0;

                minLifeTime = 0.5f;
                maxLifeTime = 1.0f;

                minScale = 0.03f;
                maxScale = 0.1f;

                minNumParticles = 20;
                maxNumParticles = 25;

                minRotationSpeed = -MathHelper.PiOver4;
                maxRotationSpeed = MathHelper.PiOver4;

                spriteBlendMode = SpriteBlendMode.Additive;

                DrawOrder = AdditiveDrawOrder;

            }

            protected override void InitializeParticle(Particle p, Vector2 where, Vector2 towhere,float unitscale)
            {
                base.InitializeParticle(p, where, towhere, unitscale);

                p.acceleration = -p.velocity / p.lifetime;
                

            }
        }
    }
}
